import matplotlib.pyplot as plt
import split_outcars
split_outcars.split_outcars()
# 数据准备
H_count = [1, 2, 3, 4, 5, 6]
dft_data = [0.516, 0.516, 0.551, 0.501, 0.359, 0.245]
e_binding_perH = [0.26523392105445964, 0.23337668564499836, 0.20239395148125064, 0.18125282614971638, 0.15037153825696806, 0.09310504301629408]

# 创建画布并绘图
plt.figure(figsize=(8, 6))
plt.plot(H_count, dft_data, 'blue', marker='o', label='DFT')
plt.plot(H_count, e_binding_perH, 'red', marker='s', label='MACE')

# 设置图形属性
plt.xlabel('Number of H Atoms')
plt.ylabel('Binding Energy (eV)')
plt.title('Comparison of DFT and E_binding_MACE with H Atom Count')
plt.legend()

# 显示图形
plt.show()